Repository navigation
Conversation
Describe how to integrate Cppcheck in Visual Studio Code, Visual Studio (external tools), Eclipse-based IDEs and CLion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dmcppcheck
left a comment
There was a problem hiding this comment.
AI review
This PR only changes documentation. The main problem is in the Visual Studio External Tools arguments: $(ItemPath) and --project=$(ProjectDir)$(ProjectFileName) are not quoted. Visual Studio does not quote the expanded macros, so a file or project under a path with spaces (for example C:\Users\John Doe\source\repos\...) is split into several arguments, and Cppcheck then looks for files that don't exist. Apart from that I found nothing wrong: all 21 new images are present and are valid PNGs, the premium blocks use the same content-visible when-profile syntax that filters/manual.lua already handles, and the options the chapter mentions (--template=vs, --premium=misra-c++-2023, --premium=safety-off) are valid in cli/cmdlineparser.cpp.
Comments
| # | Comment | By | Where | Status |
|---|---|---|---|---|
| 1 | $(ItemPath) is unquoted, so paths with spaces break |
AI review | man/manual.md:1524 |
🆕 New |
| 2 | --project=$(ProjectDir)$(ProjectFileName) is unquoted, so paths with spaces break |
AI review | man/manual.md:1533 |
🆕 New |
@danmar, please fix, resolve or reply to the open and new comments: #1, #2.
Testing
- I did not build cppcheck or run testrunner. The PR only changes
man/manual.mdand adds PNG files underman/images/, so no code changes. - I could not render the manual: neither
pandocnorquartois installed in the container, soman/buildman.shcould not run. - Images: I checked with
filethat each image the new chapter references exists underman/images/and is a valid PNG (21 files). - Premium blocks: the
::: {.content-visible when-profile="premium"}blocks match the syntax thatman/filters/manual.luasupports and thatmanual.mdalready uses elsewhere. - Options: I checked in
cli/cmdlineparser.cppthat--template=vs,--premium=misra-c++-2023and--premium=safety-offexist and appear in the help text. - I did not check the screenshots themselves or the names of the third-party plugins and their settings (VS Code "Cppcheck Official", cppcheclipse, the CLion plugin).
Automated review of 18f0650 by Claude. The pull request was built and tested locally.
|
|
||
| - Title: anything you like, for instance `Cppcheck File` | ||
| - Command: the path to the Cppcheck executable, for instance `C:\Program Files\Cppcheck\cppcheck.exe` | ||
| - Arguments: `--enable=style -q --template=vs $(ItemPath)` |
There was a problem hiding this comment.
AI review
Visual Studio does not quote the expanded macros in the External Tools "Arguments" field. If the file path contains a space (for example C:\Users\John Doe\source\repos\app\main.cpp), Cppcheck receives several separate arguments and reports that it can't find those files. Microsoft's own external tool examples quote the macro. Suggested argument line:
--enable=style -q --template=vs "$(ItemPath)"
|
|
||
| - Title: anything you like, for instance `Cppcheck Project` | ||
| - Command: the path to the Cppcheck executable, for instance `C:\Program Files\Cppcheck\cppcheck.exe` | ||
| - Arguments: `--enable=style -j12 -q --template=vs --project=$(ProjectDir)$(ProjectFileName)` |
There was a problem hiding this comment.
AI review
The same problem as for $(ItemPath): $(ProjectDir) very often contains spaces (C:\Users\<name>\source\repos\My Project\), and then the --project= argument is cut off at the first space. Suggested argument line:
--enable=style -j12 -q --template=vs "--project=$(ProjectDir)$(ProjectFileName)"
… the PDF Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dmcppcheck
left a comment
There was a problem hiding this comment.
AI review
I found no new problems. The PR changes only documentation: man/manual.md and 21 new PNG screenshots. Both issues from the earlier review are fixed. $(ItemPath) is now quoted, and so is the --project= value. Windows command-line parsing removes quotes in the middle of an argument, so --project="$(ProjectDir)$(ProjectFileName)" arrives as one argument. $(ProjectDir) ends in a backslash, but the file name follows it, so no backslash comes right before the closing quote and the quote is not escaped.
Comments
| # | Comment | By | Where | Status |
|---|---|---|---|---|
| 1 | $(ItemPath) is unquoted, so paths with spaces break |
AI review | man/manual.md:1524 |
✅ Fixed |
| 2 | --project=$(ProjectDir)$(ProjectFileName) is unquoted, so paths with spaces break |
AI review | man/manual.md:1533 |
✅ Fixed |
Testing
- I did not build cppcheck or run testrunner because the PR changes no code.
- I could not render the manual: neither
pandocnorquartois installed in the container. - Images: I checked with
filethat all 21man/images/ide-*.pngfiles that the new chapter references exist and are valid PNGs. - Visual Studio arguments: I checked the current argument lines at
man/manual.md:1527andman/manual.md:1541. Both now quote the path macros.
Automated review of 6a362d6 by Claude. The pull request was built and tested locally.
No description provided.